<?php
include_once(dirname(__FILE__) . "/../../configure/configure.php");		//--> global var
include_once(dirname(__FILE__) . "/../configure/admin.config.inc.php");	//--> admin global var
include_once(dirname(__FILE__) . "/../tools/smarty/libs/Smarty.class.php");					//--> out template

require_once(dirname(__FILE__) . "/../controlHeader.php");					//--> system control header
require_once(dirname(__FILE__) . "/../controlOperate.php");				//-->

include_once("impl/CelebrityImpl.php");

	
$celeImpl 	= new CelebrityImpl(DB_TAG_MM);

if(isset($_GET['id']) && !empty($_GET['id'])){
	$id = $_GET['id'];
		
	$isOk = $celeImpl->delete($id);
	if($isOk){
		$error_message = 'delete celebrity succeeded.';
	}else 
		$error_message = 'delete failure.';
}


echo "<script language='javascript'>";
echo "alert(\"$error_message\");";
echo "location.href=\"".$_SERVER['HTTP_REFERER']."\";";
echo "</script>";

//$backurl = $_SERVER['HTTP_REFERER'];
//header("Location: $backurl");
?>
